x = 5
y = x
y = 10
print(x)

def shu():
    return "xuxu"

class Animal:
    def speak(self):
        return "Animal speaks"

class Dog(Animal):
    def speak(self):
        return "Woof"

dog = Dog()
print(dog.speak())
print(shu())


d = {"a": 1, "b": 2}
d["c"] = 3
print(d)

t = (10, 20, 30)
print(t[1])

s = {1, 2, 3, 4}
s.add(5)
print(s)

add = lambda x, y: x + y
print(add(1, 2))

# 平方
lst = [x ** 2 for x in range(5)]
print(lst)

# 列表
lst = [x for x in range(5)]
print(lst)

# 字典
d = {x: x ** 2 for x in range(5)}
print(d)
